<template>
  <div ><slot >我是标题</slot></div>
</template>

<script>
export default {
  data(){
    return{
 
      }
  },
  methods:{
    changeTitle(){
      let title = document.title
      document.title = this.$slots.default[0].text
    }
  },
  created(){
  this.changeTitle()
  }
}
</script>
 
<style lang='less' scoped>
 
</style>